<?php include template("manage_header");?>

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul><?php echo mcurrent_guest($selector); ?></ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
				<?php if($selector=='ongoing'){?>
                    <h2>等待嘉宾</h2>
				<?php } else if($selector=='success') { ?>
                    <h2>成功嘉宾</h2>
				<?php } else { ?>
                    <h2>当前嘉宾</h2>
				<?php }?>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr><th width="40">ID</th><th width="250">嘉宾</th><th width="60" nowrap>姓名</th><th width="100">日期</th><th width="60">应征人数</th><th width="60" nowrap>手机</th><th width="140">操作</th></tr>
					<?php if(is_array($guests)){foreach($guests AS $index=>$one) { ?>
					<?php $oldstate = $one['state']; ?>
					<tr <?php echo $index%2?'':'class="alt"'; ?> id="guest-list-id-<?php echo $one['id']; ?>">
						<td><?php echo $one['id']; ?></a></td>
						<td><a class="deal-title" href="/guest.php?id=<?php echo $one['id']; ?>" target="_blank"><?php echo $one['title']; ?></a></td>
						<td nowrap><?php echo $one['name']; ?></td>
						<td nowrap><?php echo date('Y-m-d',$one['begin_time']); ?><br/><?php echo date('Y-m-d',$one['end_time']); ?></td>
						<td nowrap><?php echo $one['now_number']; ?></td>
						<td nowrap><?php echo $one['mobile']; ?></td>
						<td class="op" nowrap><a href="/ajax/manage.php?action=guestdetail&id=<?php echo $one['id']; ?>" class="ajaxlink">详情</a>｜<a href="/manage/guest/edit.php?id=<?php echo $one['id']; ?>">编辑</a>｜<a href="/ajax/manage.php?action=guestremove&id=<?php echo $one['id']; ?>" class="ajaxlink" ask="确定删除本项目吗？" >删除</a></td>
					</tr>
					<?php }}?>
					<tr><td colspan="7"><?php echo $pagestring; ?></tr>
                    </table>
				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<?php include template("manage_footer");?>
